package com.meituan.catering.management.shop.util;

import java.text.SimpleDateFormat;
import java.util.Calendar;

/**
 * @Author:ale
 * @Date 2022/4/23 22:23
 * @Version 1.0
 */
public class BusinessNoUtils {

    public static StringBuffer generateBusinessNo() {
        Calendar c = Calendar.getInstance();
        String time = new SimpleDateFormat("yyyy-MM-ddHHmmss").format(c.getTime()).toString();
        StringBuffer s = new StringBuffer(time.substring(14, 16));
        Long sys = System.currentTimeMillis();
        s.append(sys.toString().substring(11, 13));
        Double tm = Math.random() * 10000 + 1;
        s.append(tm.toString().substring(tm.toString().length() - 6, tm.toString().length()));
        return s;
    }
}